package day0110.demo2;
//赛车手
public class RacingDriverPerson {
    Car  racingCar;//赛车

    //赛车手RacingDriverPerson开车的方法drive//drive()里边调用汽车的running()
    public void drive(){
        racingCar.running();
    }

    public static void main(String[] args) {
        RacingDriverPerson hanHan=new RacingDriverPerson();

        //rdp.racingCar=new XiaoMiCar();
        XiaoMiCar su7=new XiaoMiCar();
        hanHan.racingCar=su7;

        hanHan.drive();
    }
}
